package com.assignwork.service;

import com.assignwork.dto.VoyageBillCabinSearchDTO;
import com.assignwork.dto.VoyageBillCabinSubmitByCabinDTO;
import com.assignwork.dto.VoyageBillCabinSubmitDTO;
import com.assignwork.entity.VoyageBillCabin;
import com.assignwork.vo.BillAllCabinPageVO;
import com.assignwork.vo.StartedCabinVO;
import com.assignwork.vo.VoyageBillCabinSimpleVO;
import com.assignwork.vo.VoyageBillSplitCabinPageVO;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.apache.ibatis.annotations.Param;
import org.springblade.core.mp.base.BaseService;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

/**
 * 舱图服务类
 */
public interface IVoyageBillCabinService extends BaseService<VoyageBillCabin> {

    /**
     * 全部分页
     * @param dto 搜索条件
     * @param page 分页
     * @return IPage<BillAllCabinPageVO>
     * @author dujianyu
     * @since 2023/8/24 10:03
     */
    IPage<BillAllCabinPageVO> selectVoyageBillCabinAllPage(VoyageBillCabinSearchDTO dto, IPage<BillAllCabinPageVO> page);

    /**
     * 新增或修改
     * @param dto 提交数据
     * @return Boolean
     * @author dujianyu
     * @since 2023/8/25 8:31
     */
    Boolean submitVoyageBillCabin(VoyageBillCabinSubmitDTO dto);

    /**
     * 票分页
     * @param dto 搜索参数
     * @param page 分页
     * @return  IPage<VoyageBillCabinSimpleVO>
     * @author dujianyu
     * @since 2023/8/25 14:21
     */
    IPage<VoyageBillCabinSimpleVO> selectVoyageBillCabinBillPage(VoyageBillCabinSearchDTO dto, IPage<VoyageBillCabinSimpleVO> page);

    /** 
     * 
     * @param dto 搜索参数
     * @param page 分页
     * @return
     * @author dujianyu
     * @since 2023/8/25 16:20
     */ 
    IPage<VoyageBillSplitCabinPageVO> selectVoyageBillSpiltCabinPage(VoyageBillCabinSearchDTO dto, IPage<VoyageBillSplitCabinPageVO> page);

    /**
     * 理货吨
     * @param dto 搜索条件
     * @return BigDecimal
     * @author dujianyu
     * @since 2024/1/16 15:27
     */
    BigDecimal getTallyTon(VoyageBillCabinSearchDTO dto);

    Map<String, StartedCabinVO> cabinTonByShip(Long shipId, String voyageNo);

    /**
     *
     * @param dto 数据
     * @return boolean
     * @author dujianyu
     * @since 2024/1/29 8:55
     */
    boolean submitByCabin(VoyageBillCabinSubmitByCabinDTO dto);

    /**
     * 详情
     * @param dto 搜索条件
     * @return VoyageBillCabinSimpleVO
     * @author dujianyu
     * @since 2024/4/25 9:38
     */
    VoyageBillCabinSimpleVO detail(VoyageBillCabinSearchDTO dto);
}